<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $title_for_layout?></title>
<!-- Icons -->
<link rel="shortcut icon" href="<?php echo $this->webroot; ?>img/favicon.ico" type="image/x-icon" />
<!--Meta tag -->
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="" />
<meta name="Description" content="Buy  cars, clothing, apparel, collectibles, sporting goods, digital cameras, and everything else on Authentic Avenue, the world's online..." />
<?php
echo $this->Html->css(array('stylesheet_details'));
echo $this->Html->css(array('stylesheet_details','jquery-ui-1'));
?>
<noscript>
    <div class="popupWrapper" style="display:block;margin:0 auto;">
	<div class="popupTop">&nbsp;</div>
          <div class="popupContent">              
    	<div class="popupScroller">
        	<div class="popContentWrapper">
            	<div class="allHolder">
                	<div id="popupItems" class="popupItems" style="display:block;">
					<h2>JavaScript is disabled on your browser</h2>
					Please enable JavaScript or upgrade to a JavaScript-capable browser to use Authentic Avenue.
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="popupBottom">&nbsp;</div>
</div>
</noscript>
<!--[if lt IE 7]>
<?php  echo $html->script(array("DD_belatedPNG.js")); ?>
<script type="text/javascript">

  DD_belatedPNG.fix('img, div, a.popupClose');
</script>
<![endif]-->
</head>
<body>
<div id="overlay_div"></div>
<div class="popupWrapper">
	<a href="javascript:void(0);" class="popupClose">&nbsp;</a>
	<div class="popupTop">&nbsp;</div>
          <div class="popupContent">
              <div id="loader">loading...</div>
    	<div class="popupScroller">
        	<div class="popContentWrapper">
            	<div class="allHolder">
                	<div id="popupItems" class="popupItems">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="popupBottom">&nbsp;</div>
</div>
<div id="wrapper">
<div class="header">
<?php echo $this->element('home/header'); ?>
</div>
 <div class="main-container">
<!--End Banner-->
<!--<div class="banner"></div>-->
<div class="innercon">    
<div class="lftnav">
<?php echo $this->element('home/leftmenu'); ?>
</div>
<!--End Left Navigation-->
<div class="rht-con">
    <?php
    echo $this->Session->flash();
    if ($this->Session->check('Message.auth'))
        echo $this->Session->flash('auth');
    ?>
<?php echo $content_for_layout; ?>
</div>
<!--End Product-->
</div>
</div>
<!--End Content-->
<div class="footer">
	<a title="About Authentic Avenue" href="<?php echo Configure::read('base_url');?>about_us">About Authentic Avenue</a> |
	<a title="User Agreement" href="<?php echo Configure::read('base_url');?>user_agreements">User Agreement</a> |  
	<a title="Buyers" href="<?php echo Configure::read('base_url');?>about_us/index/15">Buyers</a> |
	<a title="Sellers" href="<?php echo Configure::read('base_url');?>about_us/index/7">Sellers</a> |
	<a href="<?php echo Configure::read('base_url');?>about_us/faqs/">Ask a Question</a>
    <p>Copyright &copy; <?php echo date("Y");?> AuthenticAvenue.com All Right Reserved</p>
</div>
<!--End Footer-->
</div>
<!--countdown timer-->
<!--<div style="width: 1366px; height: 619px; z-index: 1001;" class="ui-widget-overlay"></div>-->
<div aria-disabled="true" aria-labelledby="ui-dialog-title-sessionTimeoutWarning" role="dialog" tabindex="-1" class="ui-dialog ui-widget ui-widget-content ui-corner-all  ui-dialog-disabled ui-state-disabled" style="display: none; z-index: 1002; outline: 0px none; height: auto; width: 460px; top: 227.5px; left: 449px;">
<div style="-moz-user-select: none;" unselectable="on" class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix">
<span style="-moz-user-select: none;" unselectable="on" id="ui-dialog-title-sessionTimeoutWarning" class="ui-dialog-title">Session Expiration Warning</span>
<a style="-moz-user-select: none;" unselectable="on" role="button" class="ui-dialog-titlebar-close ui-corner-all" href="#"><span style="-moz-user-select: none;" unselectable="on" class="ui-icon ui-icon-closethick">close</span></a>
</div>
<div class="ui-dialog-content ui-widget-content" id="sessionTimeoutWarning" style="height: auto; min-height: 0px; width: auto;">Your session has expired.  You are being logged out for security reasons.</div>
<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix">
<button role="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="button">
<span class="ui-button-text">OK</span></button></div>
</div>
<?php echo $this->element('sql_dump'); ?>
<script type="text/javascript">
var baseurl = "<?php echo Configure::read('base_url');?>";
</script>
<?php echo $html->script(array("jquery.min.js","script.js","jquery.jcarousel.min.js","jquery-ui.js","jquery-idletimer.js"));?>
<?php ///echo $html->script(array("jquery.min.js","script.js","jquery.jcarousel.min.js"));?>
<script type="text/javascript">
jQuery.noConflict();
        var idleTime = 1680000; // number of miliseconds until the user is considered idle
            var initialSessionTimeoutMessage = 'Your session will expire in <span id="sessionTimeoutCountdown"></span>&nbsp;seconds.<br/><br />Click on <b>OK</b> to continue your session.';
            var sessionTimeoutCountdownId = 'sessionTimeoutCountdown';
            var redirectAfter = 120; // number of seconds to wait before redirecting the user
            var redirectTo = '<?php echo Configure::read('base_url');?>'; // URL to relocate the user to once they have timed out
            var keepAliveURL = '<?php echo Router::url($this->here, true);?>'; // URL to call to keep the session alive
            var expiredMessage = 'Your session has expired.  You are being logged out for security reasons.'; // message to show user when the countdown reaches 0
            var running = false; // var to check if the countdown is running
            var timer; // reference to the setInterval timer so it can be stopped
jQuery(document).ready(function(){
	jQuery('#mycarousel').jcarousel({wrap: 'circular'});

        // create the warning window and set autoOpen to false
                var sessionTimeoutWarningDialog = jQuery("#sessionTimeoutWarning");
                jQuery(sessionTimeoutWarningDialog).html(initialSessionTimeoutMessage);
                jQuery(sessionTimeoutWarningDialog).dialog({
                    title: 'Session Expiration Warning',
                    autoOpen: false,	// set this to false so we can manually open it
                    closeOnEscape: false,
                    draggable: false,
                    width: 460,
                    minHeight: 50,
                    modal: true,
                    beforeclose: function() { // bind to beforeclose so if the user clicks on the "X" or escape to close the dialog, it will work too
                        // stop the timer
                        clearInterval(timer);

                        // stop countdown
                        running = false;

                        // ajax call to keep the server-side session alive
                        jQuery.ajax({
                            url: keepAliveURL,
                            async: false
                        });
                    },
                    buttons: {
                        OK: function() {
                            // close dialog
                            jQuery(this).dialog('close');
                        }
                    },
                    resizable: false,
                    open: function() {
                        // scrollbar fix for IE
                        jQuery('body').css('overflow','hidden');
                    },
                    close: function() {
                        // reset overflow
                        jQuery('body').css('overflow','auto');
                    }
                }); // end of dialog


                // start the idle timer
                jQuery.idleTimer(idleTime);

                // bind to idleTimer's idle.idleTimer event
                jQuery(document).bind("idle.idleTimer", function(){
                    // if the user is idle and a countdown isn't already running
                    if(jQuery.data(document,'idleTimer') === 'idle' && !running){
                        var counter = redirectAfter;
                        running = true;

                        // intialisze timer
                        jQuery('#'+sessionTimeoutCountdownId).html(redirectAfter);
                        // open dialog
                        jQuery(sessionTimeoutWarningDialog).dialog('open');

                        // create a timer that runs every second
                        timer = setInterval(function(){
                            counter -= 1;

                            // if the counter is 0, redirect the user
                            if(counter === 0) {
                                jQuery(sessionTimeoutWarningDialog).html(expiredMessage);
                                jQuery(sessionTimeoutWarningDialog).dialog('disable');
                                window.location = redirectTo;
                            } else {
                                jQuery('#'+sessionTimeoutCountdownId).html(counter);
                            };
                        }, 1000);
                    };
                });
});
</script>
</body>
</html>